﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/DefaultTemplate.master" AutoEventWireup="true" CodeBehind="Buy.aspx.cs" Inherits="TeamBuy.AccessWebUI.Buy" %>
<%@ Register src="Components/Main_PublicSystemMessage.ascx" tagname="Main_PublicSystemMessage" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphDefaultHead" runat="server">
<script type="text/javascript">
    YAHOO.util.Event.onDOMReady(function () {
        MT.app.Deal.buy(0, 0, 0);
        MT.app.Deal.address.init();
    });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphDefault" runat="server">
<uc1:Main_PublicSystemMessage ID="Main_PublicSystemMessage1" runat="server" />
        <div id="bdw" class="bdw">
            <div id="bd" class="cf">
                <div id="content">
                    <div id="deal-buy" class="box">
                        <div class="box-top">
                        </div>
                        <div class="box-content">
                            <div class="head">
                                <h2>
                                    提交订单</h2>
                            </div>
                            <div class="sect">
                                <table class="order-table">
                                    <tbody>
                                        <tr>
                                            <th class="deal-buy-desc">
                                                项目
                                            </th>
                                            <th class="deal-buy-quantity">
                                                数量
                                            </th>
                                            <th class="deal-buy-multi">
                                            </th>
                                            <th class="deal-buy-price">
                                                价格
                                            </th>
                                            <th class="deal-buy-equal">
                                            </th>
                                            <th class="deal-buy-total">
                                                总价
                                            </th>
                                        </tr>
                                        <tr>
                                            <td class="deal-buy-desc">
                                                <a href='<%=Request.UrlReferrer.ToString() %>' target="_blank">
                                                    <asp:Literal ID="ltlDealTitle" runat="server"></asp:Literal></a>
                                            </td>
                                            <td class="deal-buy-quantity">
                                                <asp:TextBox ID="txtQuantity" runat="server" class="input-text f-input" Text="1" MaxLength="4"></asp:TextBox>
                                            </td>
                                            <td class="deal-buy-multi">
                                                x
                                            </td>
                                            <td class="deal-buy-price">
                                                <span class="money">¥</span><span id="deal-buy-price"><asp:Literal ID="ltlPrice" runat="server"></asp:Literal></span>
                                            </td>
                                            <td class="deal-buy-equal">
                                                =
                                            </td>
                                            <td class="deal-buy-total">
                                                <span class="money">¥</span><span id="deal-buy-total"><asp:Literal ID="ltlTotal" runat="server"></asp:Literal></span>
                                            </td>
                                        </tr>
                                        <tr runat="server" id="cardcoderow">
                                            <td class="deal-buy-desc">
                                                礼品卡：<span id="cardcode-row-n"><asp:Literal ID="ltlCardNumber" runat="server"></asp:Literal></span>
                                            </td>
                                            <td class="deal-buy-quantity">
                                            </td>
                                            <td class="deal-buy-multi">
                                            </td>
                                            <td class="deal-buy-price">
                                            </td>
                                            <td class="deal-buy-equal">
                                            </td>
                                            <td class="deal-buy-total">
                                                -<span class="money">¥</span><span id="cardcode-row-t"><asp:Literal ID="ltlCardPrice" runat="server" Text="0"></asp:Literal></span>
                                            </td>
                                        </tr>
                                        <tr runat="server" style="display:none;" visible="true" id="transferrow">
                                            <td class="deal-buy-desc">
                                                运费：<span id="transfer-row-n"></span>
                                            </td>
                                            <td class="deal-buy-quantity">
                                            </td>
                                            <td class="deal-buy-multi">
                                            </td>
                                            <td class="deal-buy-price">
                                            </td>
                                            <td class="deal-buy-equal">
                                            </td>
                                            <td class="deal-buy-total">
                                                <span class="money">¥</span><span id="transfer-row-t"><asp:Literal ID="ltlTransferFee" runat="server" Text="0"></asp:Literal></span>
                                            </td>
                                        </tr>
                                        <tr class="order-total">
                                            <td class="deal-buy-desc">
                                                <strong>应付总额</strong>
                                            </td>
                                            <td class="deal-buy-quantity">
                                            </td>
                                            <td class="deal-buy-multi">
                                            </td>
                                            <td class="deal-buy-price">
                                            </td>
                                            <td class="deal-buy-equal">
                                                =
                                            </td>
                                            <td class="deal-buy-total">
                                                <span class="money">¥</span><strong id="deal-buy-total-t"><asp:Literal ID="ltlTotalAll" runat="server"></asp:Literal></strong>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div class="enter-mobile">
                                    <h3>
                                        请输入您的手机号：</h3>
                                    <p class="text">
                                        <asp:TextBox ID="txtMobile" runat="server" class="f-text"></asp:TextBox>
                                        <asp:RegularExpressionValidator ID="revMobile" runat="server" ErrorMessage="" 
                                            ControlToValidate="txtMobile" ValidationGroup="Mobile" Display="Dynamic" ValidationExpression="^\d{11}$"></asp:RegularExpressionValidator>
                                        <span id="deal-buy-mobile-tip" class="tip">重要：购买成功后将把美团券密码发到您手机，凭短信去商家消费。</span>
                                    </p>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="form-submit">
                                    <asp:Button ID="btnPay" class="formbutton" runat="server" Text="确认无误，购买" 
                                        onclick="btnPay_Click" ValidationGroup="Mobile" />
                                </div>
                            </div>

                        </div>
                        <div class="box-bottom">
                            
                        </div>
                    </div>
                </div>
                <div id="sidebar">
                    <div class="sbox">
                        <div class="sbox-top">
                        </div>
                        <div class="sbox-content">
                            <div class="cardcode">
                                <h2>
                                    您有礼品卡吗？</h2>
                                <a id="cardcode-link" href="javascript:void(0);">点击输入礼品卡号码</a>
                                <p id="cardcode-link-t" class="act">
                                    <asp:TextBox ID="txtCardCode" runat="server" class="f-input" MaxLength="8"></asp:TextBox>
                                    <asp:Button ID="btnAddCard" class="formbutton" runat="server" Text="确定" 
                                        onclick="btnAddCard_Click" />
                                </p>
                            </div>
                        </div>
                        <div class="sbox-bottom">
                        </div>
                    </div>
                </div>
            </div>
            <!-- bd end -->
        </div>
        <!-- bdw end -->
</asp:Content>
